package com.maiji.cloud.mapper;

import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.maiji.cloud.entities.shopingmall.DiscountCoupon;

@Mapper
public interface DiscountCouponMapper extends BaseMapper<DiscountCoupon>{

	/**
	 * 获得可兑换优惠券
	 * @return
	 */
	List<DiscountCoupon> selectDiscountCouponList(@Param("nowTime")Date nowTime,@Param("price") Double price,@Param("type")Integer type);

	/**
	 * 获得现在可以使用的并且可兑换的
	 * @param nowTime
	 * @param price
	 * @param type
	 * @return
	 */
	List<DiscountCoupon> selectDiscountCouponListByTime(@Param("nowTime")Date nowTime,@Param("price") Double price,@Param("type")Integer type);

}
